<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue 循环</title>
</head>
<body>
<div id="app">

    <template v-for="(user,index) in usersList">
        <ul v-bind:id="index">
            <li>{{user.username}}</li>
            <li>{{user.password}}</li>
        </ul>
    </template>
</div>

<script src="../js/vue.js"></script>
<script>

    const message = {
        usersList : [
            {
                username : '张三',
                password : '123456',
            },
            {
                username : '李四',
                password : '123456',
            }
        ]
    };

    //数据冻结, 禁止调试
    //Object.freeze(message)

    const demo = new Vue({
        el: '#app',
        data: message,
        methods: {},
        computed: {}
    });
</script>
</body>
</html>